package com.ybfenpan.controller.admin;


import com.ybfenpan.model.Admin;
import com.ybfenpan.utils.ContextUtil;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


@Controller
@RequestMapping("/admin")
public class ApplicationAdminController {

 
	@RequestMapping("/applicationAdmin.shtml")
	public String adminLogin(HttpServletRequest request, HttpServletResponse response, Model model) {
		 
		Admin admin = ContextUtil.getAdmin();
		if (admin != null) {
			return "admin/applicationAdmin";
		} else {
			return "loginAdmin";
		 
		}
		

	}
	
	 
	
}
